package com.maisuiit.basics;

import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 * @Description:九九乘法表
 * @Author: zhangcc
 * @CreateTime: 2022-10-25
 */
public class IOTest5 {
    public static void main(String []args){
        try{
            //输入流，从键盘接收数
            InputStreamReader isr=new InputStreamReader(System.in);
            BufferedReader br=new BufferedReader(isr);

            //给出提示
            System.out.println("请输入1-9，按0退出:");
            //从控制台读取一行数据
            String a1=br.readLine();

            //把String转为int
            int num1=Integer.decode(a1);
            for(int i=1;i<=num1;i++){
                for(int j=1;j<=i;j++){
                    System.out.print(i+"×"+j+"="+(i*j)+"\t");
                }
                System.out.println();
            }
        }catch(Exception e){
            e.printStackTrace();
        }
    }
}
